﻿@model TumbaloSoft.Models.MyViewModel
@{
    Layout = "~/Views/Shared/_VendedorLayout.cshtml";
    ViewBag.Title = "Responder Consulta";
}

<script>
    // increase the default animation speed to exaggerate the effect
    //$.fx.speeds._default = 4000;
    $(function () {
        $("#dialog").dialog({
            autoOpen: false,
            resizable: false,
            height: 240,
            modal: true,
            buttons: {
                "Si": function () {
                    $("#form_1").submit();
                    $(this).dialog('close');
                },

                "No": function () {
                    $(this).dialog("close");
                }
            }
        });

        $("#open").click(function () {
            $("#dialog").dialog("open");
            return false;
        });


    });
</script>

<script>
    $(function () {
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            dateFormat: 'dd/mm/yy',
		
        });
    });
</script>


<!-- content -->
		<div class="body2">
			<div class="main">
				<section id="content">
					<div class="wrapper">

                        <article class="col0">
						    <nav class="urbangreymenu">
							    <h3 class="headerbar">Citas</h3>
							    <ul id="subMenu">
                                    <li>
									    <h5>@Html.ActionLink("Lista de Consultas", "Consulta")</h5>
								    </li>								
							    </ul>
						    </nav>
					    </article>

                        <article class="col5">
                        <div>&nbsp</div>
                        </article>
						
						<!--Formulario-->
					    <article class="col1" style="width: 660px">
						    <form id="form_1" method="post" style="height: 100%">
							    <div class="pad1">
								    <h2 class="pad_bot1 pad_top1">Responder Consulta</h2>
                                    <!--DATOS DE LA PERSONA-->
                                    <h3 class="pad_bot1 pad_top1">Datos de la Persona: </h3>
                                                         
                                                                          
                                    <!--NOMBRE-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                @if (Model.PersonaNatural != null)
                                                {
                                                    <td style="width: 210px"><span>Nombre:</span></td>
                                                    <td style="width: 210px">
                                                        @Html.TextBoxFor(model => model.PersonaNatural.prNombre, new {style = "background-color: #b7b3b3", disabled = "true", @class = "input"})
                                                    </td>
                                                }
                                                else
                                                {
                                                    <td style="width: 210px"><span>Razon Social:</span></td>
                                                    <td style="width: 210px">
                                                        @Html.TextBoxFor(model => model.PersonaJuridica.prRazonSocial, new { style = "background-color: #b7b3b3", disabled = "true", @class = "input" })
                                                    </td>
                                                }
                                            </tr>
                                        </table>
                                    </div>
                                    
                                    <!--EMAIL-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Email:</span></td>
                                                <td style="width: 210px">
                                                    @if (Model.PersonaNatural != null)
                                                    {
                                                        @Html.TextBoxFor(model => model.PersonaNatural.prEmail, new { style = "background-color: #b7b3b3", disabled = "true", @class = "input" })
                                                    }
                                                    else
                                                    {
                                                        @Html.TextBoxFor(model => model.PersonaJuridica.prEmail, new { style = "background-color: #b7b3b3", disabled = "true", @class = "input" })
                                                    }
                                                </td>
                                            </tr>
                                        </table>
                                    </div>


                                    <!--TELEFONO-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Teléfono:</span></td>
                                                <td style="width: 210px"> 
                                                    @if (Model.PersonaNatural != null)
                                                    {
                                                        @Html.TextBoxFor(model => model.PersonaNatural.prTelefono, new { style = "background-color: #b7b3b3", disabled = "true", @class = "input" })
                                                    }
                                                    else
                                                    {
                                                        @Html.TextBoxFor(model => model.PersonaJuridica.prTelefono, new { style = "background-color: #b7b3b3", disabled = "true", @class = "input" })
                                                    }                                                    
                                                </td>
                                            </tr>
                                        </table> 
                                    </div>

                                    <!--MENSAJE-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
											    <td style="width: 173px"><span>Mensaje:</span></td>
                                                <td>
                                                    @Html.TextAreaFor(model => model.Consulta.prMensaje, new { style = "background-color: #b7b3b3;  width: 264px; height: 38px; margin-left: 120px; border-left-width: 0px;", disabled = "true", @class = "input" })
                                                </td>
                                            </tr>
                                        </table> 
									</div>
										
                                   
                                    <!--ASIGNAR AL VENDEDOR-->
                                    <h3 class="pad_bot1 pad_top1">Respuesta : </h3>
                                                                    
                                   
                                    <div  class="row">
                                        <table style="width: 420px">
                                            <tr>
											    <td style="width: 173px"><span>Su Respuesta:</span></td>
                                            <td>
                                            <textarea name="respuesta" style="width: 214px; margin-left: 107px;"></textarea>                                            											       
                                            </td>
                                            </tr>
                                        </table> 
									</div>
                                                          

                                    <table style="width: 500px">
                                    <tr>
                                        <td style="width: 167px">
									    <div id="dialog" title="Responder Consulta">
                                                    <p>Esta seguro que desea enviar la respuesta?</p>                                                    
                                                    <!--<a href="#" id="opener"  class="button" onClick="document.getElementById('form_1').submit()">Guardar</a>-->
                                                </div>

                                                <button id="open"  class="button">Enviar</button>

                                        </td>
                                        <td style="width: 166px"><a href="#" class="button" onclick="document.getElementById('form_1').reset()">Limpiar</a></td>
                                        <td style="width: 167px"><a href="javascript:history.go(-1)" class="button" onclick="document.getElementById('form_1').cancel()">Cancelar</a></td>
                                    </tr>
                                </table>

								<br>
								<br>
                                </div>
                            </form>
                        </article>
					</div>
					
				</section>
			</div>
		</div>
<!-- / content -->
		
		<script type="text/javascript"> Cufon.now(); </script>
    